package com.ycy.service.Role;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ycy.dao.RoleDao;
import com.ycy.pojo.Role;
@Service
public class RoleServiceImpl implements RoleService{
	@Autowired
	RoleDao roleDao;
	public List<Role> findall() {
		return roleDao.findall();
	}

	
	public int del(int id) {
		return roleDao.del(id);
	}

	
	public int add(Role role) {
		return roleDao.add(role);
	}

	
	public Role findByName(String name) {
		return roleDao.findIt(name);
	}

	
	public int edit(Role role) {
		return roleDao.edit(role);
	}

}
